package lib.bone.access.module.oss;

import lib.bone.access.module.oss.domain.NepuResearchFile;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author: kindear
 */
public interface NepuResearchFileDAO extends JpaRepository<NepuResearchFile,String> {
    /**
     * 根据实体ID删除
     */
    void deleteByMapperId(String mapperId);

    /**
     * 根据ID列表查询
     * @param ids
     * @return
     */
    List<NepuResearchFile> findByIdIn(List<String> ids);

    /**
     * 根据科研类型和关联ID 进行查询
     * @param researchType
     * @param mapperId
     * @return
     */
    List<NepuResearchFile> findByResearchTypeAndMapperId(String researchType,String mapperId);

    /**
     * 根据ID删除
     * @param id
     */
    void deleteById(String id);
}
